package com.ourteam.system.dao;

import net.dao.BaseQueryBean;
import net.dao.BaseWhereCriterion;
import net.dao.IDataAccessInterface;

import org.apache.commons.lang.StringUtils;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


/**
 * Template Name : DAO查询对象
 * Template Version : 1
 * Template Last Modfiy Date : Sat Aug 19 10:06:32 CST 2017
 * Auto Generate Date : 2018-07-31 15:13:27
  * Warning ! This file will be overwrite when regenerate !
  *
 */
public class SysRoleRelateDAOQueryBean extends BaseQueryBean {
    public SysRoleRelateDAOQueryBean() {
        super();
    }

    public SysRoleRelateDAOQueryBean(BaseQueryBean aQueryBean) {
        super(aQueryBean);
    }

    public SysRoleRelateDAOQueryBean(BaseQueryBean aQueryBean,
        Map tableReplaceMap) {
        super(aQueryBean, tableReplaceMap);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();

        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }

        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        return new Criteria(this);
    }

    public void addIdSelectProperty() {
        addIdSelectProperty("id");
    }

    public void addIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.Id, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.Id, "id");
        }
    }

    public void addRelatedSysRoleIdSelectProperty() {
        addRelatedSysRoleIdSelectProperty("relatedSysRoleId");
    }

    public void addRelatedSysRoleIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.RelatedSysRoleId, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.RelatedSysRoleId,
                "relatedSysRoleId");
        }
    }

    public void addRemarksSelectProperty() {
        addRemarksSelectProperty("remarks");
    }

    public void addRemarksSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.Remarks, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.Remarks, "remarks");
        }
    }

    public void addStatusSelectProperty() {
        addStatusSelectProperty("status");
    }

    public void addStatusSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.Status, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.Status, "status");
        }
    }

    public void addSysRoleGroupIdSelectProperty() {
        addSysRoleGroupIdSelectProperty("sysRoleGroupId");
    }

    public void addSysRoleGroupIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.SysRoleGroupId, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.SysRoleGroupId, "sysRoleGroupId");
        }
    }

    public void addRelatedSysRoleCodeSelectProperty() {
        addRelatedSysRoleCodeSelectProperty("relatedSysRoleCode");
    }

    public void addRelatedSysRoleCodeSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.RelatedSysRoleCode, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.RelatedSysRoleCode,
                "relatedSysRoleCode");
        }
    }

    public void addSysRoleNameSelectProperty() {
        addSysRoleNameSelectProperty("sysRoleName");
    }

    public void addSysRoleNameSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.SysRoleName, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.SysRoleName, "sysRoleName");
        }
    }

    public void addSysRoleCodeSelectProperty() {
        addSysRoleCodeSelectProperty("sysRoleCode");
    }

    public void addSysRoleCodeSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.SysRoleCode, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.SysRoleCode, "sysRoleCode");
        }
    }

    public void addSysRoleTypeSelectProperty() {
        addSysRoleTypeSelectProperty("sysRoleType");
    }

    public void addSysRoleTypeSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.SysRoleType, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.SysRoleType, "sysRoleType");
        }
    }

    public void addSysRoleDomainIdSelectProperty() {
        addSysRoleDomainIdSelectProperty("sysRoleDomainId");
    }

    public void addSysRoleDomainIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.SysRoleDomainId, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.SysRoleDomainId,
                "sysRoleDomainId");
        }
    }

    public void addSysDomainCodeSelectProperty() {
        addSysDomainCodeSelectProperty("sysDomainCode");
    }

    public void addSysDomainCodeSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.SysDomainCode, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.SysDomainCode, "sysDomainCode");
        }
    }

    public void addSysDomainNameSelectProperty() {
        addSysDomainNameSelectProperty("sysDomainName");
    }

    public void addSysDomainNameSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysRoleRelateDAO.SysDomainName, aAlias);
        } else {
            addSelectProperty(ISysRoleRelateDAO.SysDomainName, "sysDomainName");
        }
    }

    public void addAllSelectProperties() {
        addIdSelectProperty();

        addRelatedSysRoleIdSelectProperty();

        addRemarksSelectProperty();

        addStatusSelectProperty();

        addSysRoleGroupIdSelectProperty();

        addRelatedSysRoleCodeSelectProperty();

        addSysRoleNameSelectProperty();

        addSysRoleCodeSelectProperty();

        addSysRoleTypeSelectProperty();

        addSysRoleDomainIdSelectProperty();

        addSysDomainCodeSelectProperty();

        addSysDomainNameSelectProperty();
    }

    public static class Criteria extends BaseWhereCriterion<SysRoleRelateDAOQueryBean> {
        protected Criteria(SysRoleRelateDAOQueryBean aParentObject) {
            super(aParentObject);
        }

        public Criteria andIdIsNull() {
            addCriterion(ISysRoleRelateDAO.Id + " is null");

            return this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion(ISysRoleRelateDAO.Id + " is not null");

            return this;
        }

        public Criteria andIdIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.Id + " is not null AND " +
                ISysRoleRelateDAO.Id + " <> ''");

            return this;
        }

        public Criteria andIdIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.Id + " is null OR " +
                ISysRoleRelateDAO.Id + " = '')");

            return this;
        }

        public Criteria andIdEqualTo(long value) {
            return andIdEqualTo(Long.valueOf(value));
        }

        public Criteria andIdEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.Id + " = ", value, "id");

            return this;
        }

        public Criteria andIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Id);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Id + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdNotEqualTo(long value) {
            return andIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToOrIsNull(long value) {
            return andIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.Id + " is null OR " +
                ISysRoleRelateDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Id);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Id + " <> ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdGreaterThan(long value) {
            return andIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.Id + " >", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Id);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Id + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(long value) {
            return andIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.Id + " >=", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Id);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Id + " >= ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdLessThan(long value) {
            return andIdLessThan(Long.valueOf(value));
        }

        public Criteria andIdLessThan(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.Id + " <", value, "id");

            return this;
        }

        public Criteria andIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Id);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Id + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(long value) {
            return andIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.Id + " <=", value, "id");

            return this;
        }

        public Criteria andIdLessThanOrEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Id);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Id + " <= ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdIn(long[] values) {
            if (values.length == 1) {
                return andIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.Id + " in", values, "id");

                return this;
            }
        }

        public Criteria andIdNotIn(long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.Id + " not in", values, "id");

                return this;
            }
        }

        public Criteria andIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.Id + " in", values, "id");

                return this;
            }
        }

        public Criteria andIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.Id + " not in", values, "id");

                return this;
            }
        }

        public Criteria andIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.Id + " in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.Id + " not in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Id + " in ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Id + " not in ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdBetween(long value1, long value2) {
            addCriterion(ISysRoleRelateDAO.Id + " between", value1, value2, "id");

            return this;
        }

        public Criteria andIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleRelateDAO.Id + " between", value1, value2, "id");

            return this;
        }

        public Criteria andIdNotBetween(long value1, long value2) {
            addCriterion(ISysRoleRelateDAO.Id + " not between", value1, value2,
                "id");

            return this;
        }

        public Criteria andIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleRelateDAO.Id + " not between", value1, value2,
                "id");

            return this;
        }

        public Criteria andRelatedSysRoleIdIsNull() {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " is null");

            return this;
        }

        public Criteria andRelatedSysRoleIdIsNotNull() {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " is not null");

            return this;
        }

        public Criteria andRelatedSysRoleIdIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId +
                " is not null AND " + ISysRoleRelateDAO.RelatedSysRoleId +
                " <> ''");

            return this;
        }

        public Criteria andRelatedSysRoleIdIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.RelatedSysRoleId +
                " is null OR " + ISysRoleRelateDAO.RelatedSysRoleId + " = '')");

            return this;
        }

        public Criteria andRelatedSysRoleIdEqualTo(long value) {
            return andRelatedSysRoleIdEqualTo(Long.valueOf(value));
        }

        public Criteria andRelatedSysRoleIdEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " = ", value,
                "relatedSysRoleId");

            return this;
        }

        public Criteria andRelatedSysRoleIdEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleIdNotEqualTo(long value) {
            return andRelatedSysRoleIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andRelatedSysRoleIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " <>", value,
                "relatedSysRoleId");

            return this;
        }

        public Criteria andRelatedSysRoleIdNotEqualToOrIsNull(long value) {
            return andRelatedSysRoleIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andRelatedSysRoleIdNotEqualToOrIsNull(
            java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " is null OR " +
                ISysRoleRelateDAO.RelatedSysRoleId + " <>", value,
                "relatedSysRoleId");

            return this;
        }

        public Criteria andRelatedSysRoleIdNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleIdNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleIdGreaterThan(long value) {
            return andRelatedSysRoleIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andRelatedSysRoleIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " >", value,
                "relatedSysRoleId");

            return this;
        }

        public Criteria andRelatedSysRoleIdGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleIdGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleIdGreaterThanOrEqualTo(long value) {
            return andRelatedSysRoleIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andRelatedSysRoleIdGreaterThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " >=", value,
                "relatedSysRoleId");

            return this;
        }

        public Criteria andRelatedSysRoleIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleIdLessThan(long value) {
            return andRelatedSysRoleIdLessThan(Long.valueOf(value));
        }

        public Criteria andRelatedSysRoleIdLessThan(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " <", value,
                "relatedSysRoleId");

            return this;
        }

        public Criteria andRelatedSysRoleIdLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleIdLessThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleIdLessThanOrEqualTo(long value) {
            return andRelatedSysRoleIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andRelatedSysRoleIdLessThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " <=", value,
                "relatedSysRoleId");

            return this;
        }

        public Criteria andRelatedSysRoleIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleIdIn(long[] values) {
            if (values.length == 1) {
                return andRelatedSysRoleIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " in",
                    values, "relatedSysRoleId");

                return this;
            }
        }

        public Criteria andRelatedSysRoleIdNotIn(long[] values) {
            if (values.length == 1) {
                return andRelatedSysRoleIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " not in",
                    values, "relatedSysRoleId");

                return this;
            }
        }

        public Criteria andRelatedSysRoleIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andRelatedSysRoleIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " in",
                    values, "relatedSysRoleId");

                return this;
            }
        }

        public Criteria andRelatedSysRoleIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andRelatedSysRoleIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " not in",
                    values, "relatedSysRoleId");

                return this;
            }
        }

        public Criteria andRelatedSysRoleIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andRelatedSysRoleIdEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " in",
                    Arrays.asList(values), "relatedSysRoleId");

                return this;
            }
        }

        public Criteria andRelatedSysRoleIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andRelatedSysRoleIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " not in",
                    Arrays.asList(values), "relatedSysRoleId");

                return this;
            }
        }

        public Criteria andRelatedSysRoleIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleIdBetween(long value1, long value2) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " between",
                value1, value2, "relatedSysRoleId");

            return this;
        }

        public Criteria andRelatedSysRoleIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " between",
                value1, value2, "relatedSysRoleId");

            return this;
        }

        public Criteria andRelatedSysRoleIdNotBetween(long value1, long value2) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " not between",
                value1, value2, "relatedSysRoleId");

            return this;
        }

        public Criteria andRelatedSysRoleIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleId + " not between",
                value1, value2, "relatedSysRoleId");

            return this;
        }

        public Criteria andRemarksIsNull() {
            addCriterion(ISysRoleRelateDAO.Remarks + " is null");

            return this;
        }

        public Criteria andRemarksIsNotNull() {
            addCriterion(ISysRoleRelateDAO.Remarks + " is not null");

            return this;
        }

        public Criteria andRemarksIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.Remarks + " is not null AND " +
                ISysRoleRelateDAO.Remarks + " <> ''");

            return this;
        }

        public Criteria andRemarksIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.Remarks + " is null OR " +
                ISysRoleRelateDAO.Remarks + " = '')");

            return this;
        }

        public Criteria andRemarksEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.Remarks + " = ", value, "remarks");

            return this;
        }

        public Criteria andRemarksEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Remarks);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Remarks + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksNotEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.Remarks + " <>", value, "remarks");

            return this;
        }

        public Criteria andRemarksNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleRelateDAO.Remarks + " is null OR " +
                ISysRoleRelateDAO.Remarks + " <>", value, "remarks");

            return this;
        }

        public Criteria andRemarksNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Remarks);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Remarks + " <> ", subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksGreaterThan(String value) {
            addCriterion(ISysRoleRelateDAO.Remarks + " >", value, "remarks");

            return this;
        }

        public Criteria andRemarksGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Remarks);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Remarks + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.Remarks + " >=", value, "remarks");

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Remarks);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Remarks + " >= ", subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksLessThan(String value) {
            addCriterion(ISysRoleRelateDAO.Remarks + " <", value, "remarks");

            return this;
        }

        public Criteria andRemarksLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Remarks);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Remarks + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.Remarks + " <=", value, "remarks");

            return this;
        }

        public Criteria andRemarksLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Remarks);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRemarksLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Remarks + " <= ", subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.Remarks + " like",
                buffer.toString(), "remarks");

            return this;
        }

        public Criteria andRemarksNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.Remarks + " not like",
                buffer.toString(), "remarks");

            return this;
        }

        public Criteria andRemarksIn(List<String> values) {
            if (values.size() == 1) {
                return andRemarksEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.Remarks + " in", values,
                    "remarks");

                return this;
            }
        }

        public Criteria andRemarksNotIn(List<String> values) {
            if (values.size() == 1) {
                return andRemarksNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.Remarks + " not in", values,
                    "remarks");

                return this;
            }
        }

        public Criteria andRemarksIn(String[] values) {
            if (values.length == 1) {
                return andRemarksEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.Remarks + " in",
                    Arrays.asList(values), "remarks");

                return this;
            }
        }

        public Criteria andRemarksNotIn(String[] values) {
            if (values.length == 1) {
                return andRemarksNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.Remarks + " not in",
                    Arrays.asList(values), "remarks");

                return this;
            }
        }

        public Criteria andRemarksIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Remarks + " in ", subQueryBean, dao);

            return this;
        }

        public Criteria andRemarksNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Remarks + " not in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andRemarksBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.Remarks + " between", value1,
                value2, "remarks");

            return this;
        }

        public Criteria andRemarksNotBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.Remarks + " not between", value1,
                value2, "remarks");

            return this;
        }

        public Criteria andStatusIsNull() {
            addCriterion(ISysRoleRelateDAO.Status + " is null");

            return this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion(ISysRoleRelateDAO.Status + " is not null");

            return this;
        }

        public Criteria andStatusIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.Status + " is not null AND " +
                ISysRoleRelateDAO.Status + " <> ''");

            return this;
        }

        public Criteria andStatusIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.Status + " is null OR " +
                ISysRoleRelateDAO.Status + " = '')");

            return this;
        }

        public Criteria andStatusEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.Status + " = ", value, "status");

            return this;
        }

        public Criteria andStatusEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Status);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Status + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusNotEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.Status + " <>", value, "status");

            return this;
        }

        public Criteria andStatusNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleRelateDAO.Status + " is null OR " +
                ISysRoleRelateDAO.Status + " <>", value, "status");

            return this;
        }

        public Criteria andStatusNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Status);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Status + " <> ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusGreaterThan(String value) {
            addCriterion(ISysRoleRelateDAO.Status + " >", value, "status");

            return this;
        }

        public Criteria andStatusGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Status);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Status + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.Status + " >=", value, "status");

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Status);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Status + " >= ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLessThan(String value) {
            addCriterion(ISysRoleRelateDAO.Status + " <", value, "status");

            return this;
        }

        public Criteria andStatusLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Status);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Status + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.Status + " <=", value, "status");

            return this;
        }

        public Criteria andStatusLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.Status);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Status + " <= ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.Status + " like", buffer.toString(),
                "status");

            return this;
        }

        public Criteria andStatusNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.Status + " not like",
                buffer.toString(), "status");

            return this;
        }

        public Criteria andStatusIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.Status + " in", values, "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.Status + " not in", values,
                    "status");

                return this;
            }
        }

        public Criteria andStatusIn(String[] values) {
            if (values.length == 1) {
                return andStatusEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.Status + " in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(String[] values) {
            if (values.length == 1) {
                return andStatusNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.Status + " not in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Status + " in ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.Status + " not in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.Status + " between", value1, value2,
                "status");

            return this;
        }

        public Criteria andStatusNotBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.Status + " not between", value1,
                value2, "status");

            return this;
        }

        public Criteria andSysRoleGroupIdIsNull() {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " is null");

            return this;
        }

        public Criteria andSysRoleGroupIdIsNotNull() {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " is not null");

            return this;
        }

        public Criteria andSysRoleGroupIdIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId +
                " is not null AND " + ISysRoleRelateDAO.SysRoleGroupId +
                " <> ''");

            return this;
        }

        public Criteria andSysRoleGroupIdIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.SysRoleGroupId +
                " is null OR " + ISysRoleRelateDAO.SysRoleGroupId + " = '')");

            return this;
        }

        public Criteria andSysRoleGroupIdEqualTo(long value) {
            return andSysRoleGroupIdEqualTo(Long.valueOf(value));
        }

        public Criteria andSysRoleGroupIdEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " = ", value,
                "sysRoleGroupId");

            return this;
        }

        public Criteria andSysRoleGroupIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleGroupId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleGroupIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleGroupIdNotEqualTo(long value) {
            return andSysRoleGroupIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andSysRoleGroupIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " <>", value,
                "sysRoleGroupId");

            return this;
        }

        public Criteria andSysRoleGroupIdNotEqualToOrIsNull(long value) {
            return andSysRoleGroupIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andSysRoleGroupIdNotEqualToOrIsNull(
            java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " is null OR " +
                ISysRoleRelateDAO.SysRoleGroupId + " <>", value,
                "sysRoleGroupId");

            return this;
        }

        public Criteria andSysRoleGroupIdNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleGroupId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleGroupIdNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleGroupIdGreaterThan(long value) {
            return andSysRoleGroupIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andSysRoleGroupIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " >", value,
                "sysRoleGroupId");

            return this;
        }

        public Criteria andSysRoleGroupIdGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleGroupId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleGroupIdGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleGroupIdGreaterThanOrEqualTo(long value) {
            return andSysRoleGroupIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andSysRoleGroupIdGreaterThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " >=", value,
                "sysRoleGroupId");

            return this;
        }

        public Criteria andSysRoleGroupIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleGroupId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleGroupIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleGroupIdLessThan(long value) {
            return andSysRoleGroupIdLessThan(Long.valueOf(value));
        }

        public Criteria andSysRoleGroupIdLessThan(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " <", value,
                "sysRoleGroupId");

            return this;
        }

        public Criteria andSysRoleGroupIdLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleGroupId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleGroupIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleGroupIdLessThanOrEqualTo(long value) {
            return andSysRoleGroupIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andSysRoleGroupIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " <=", value,
                "sysRoleGroupId");

            return this;
        }

        public Criteria andSysRoleGroupIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleGroupId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleGroupIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleGroupIdIn(long[] values) {
            if (values.length == 1) {
                return andSysRoleGroupIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " in", values,
                    "sysRoleGroupId");

                return this;
            }
        }

        public Criteria andSysRoleGroupIdNotIn(long[] values) {
            if (values.length == 1) {
                return andSysRoleGroupIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " not in",
                    values, "sysRoleGroupId");

                return this;
            }
        }

        public Criteria andSysRoleGroupIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andSysRoleGroupIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " in", values,
                    "sysRoleGroupId");

                return this;
            }
        }

        public Criteria andSysRoleGroupIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andSysRoleGroupIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " not in",
                    values, "sysRoleGroupId");

                return this;
            }
        }

        public Criteria andSysRoleGroupIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andSysRoleGroupIdEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " in",
                    Arrays.asList(values), "sysRoleGroupId");

                return this;
            }
        }

        public Criteria andSysRoleGroupIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andSysRoleGroupIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " not in",
                    Arrays.asList(values), "sysRoleGroupId");

                return this;
            }
        }

        public Criteria andSysRoleGroupIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleGroupIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleGroupIdBetween(long value1, long value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " between", value1,
                value2, "sysRoleGroupId");

            return this;
        }

        public Criteria andSysRoleGroupIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " between", value1,
                value2, "sysRoleGroupId");

            return this;
        }

        public Criteria andSysRoleGroupIdNotBetween(long value1, long value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " not between",
                value1, value2, "sysRoleGroupId");

            return this;
        }

        public Criteria andSysRoleGroupIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleGroupId + " not between",
                value1, value2, "sysRoleGroupId");

            return this;
        }

        public Criteria andRelatedSysRoleCodeIsNull() {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " is null");

            return this;
        }

        public Criteria andRelatedSysRoleCodeIsNotNull() {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " is not null");

            return this;
        }

        public Criteria andRelatedSysRoleCodeIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode +
                " is not null AND " + ISysRoleRelateDAO.RelatedSysRoleCode +
                " <> ''");

            return this;
        }

        public Criteria andRelatedSysRoleCodeIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.RelatedSysRoleCode +
                " is null OR " + ISysRoleRelateDAO.RelatedSysRoleCode +
                " = '')");

            return this;
        }

        public Criteria andRelatedSysRoleCodeEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " = ", value,
                "relatedSysRoleCode");

            return this;
        }

        public Criteria andRelatedSysRoleCodeEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleCode);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleCodeEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleCodeNotEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " <>", value,
                "relatedSysRoleCode");

            return this;
        }

        public Criteria andRelatedSysRoleCodeNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " is null OR " +
                ISysRoleRelateDAO.RelatedSysRoleCode + " <>", value,
                "relatedSysRoleCode");

            return this;
        }

        public Criteria andRelatedSysRoleCodeNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleCode);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleCodeNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleCodeGreaterThan(String value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " >", value,
                "relatedSysRoleCode");

            return this;
        }

        public Criteria andRelatedSysRoleCodeGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleCode);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleCodeGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleCodeGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " >=", value,
                "relatedSysRoleCode");

            return this;
        }

        public Criteria andRelatedSysRoleCodeGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleCode);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleCodeGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleCodeLessThan(String value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " <", value,
                "relatedSysRoleCode");

            return this;
        }

        public Criteria andRelatedSysRoleCodeLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleCode);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleCodeLessThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleCodeLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " <=", value,
                "relatedSysRoleCode");

            return this;
        }

        public Criteria andRelatedSysRoleCodeLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.RelatedSysRoleCode);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andRelatedSysRoleCodeLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleCodeLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " like",
                buffer.toString(), "relatedSysRoleCode");

            return this;
        }

        public Criteria andRelatedSysRoleCodeNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " not like",
                buffer.toString(), "relatedSysRoleCode");

            return this;
        }

        public Criteria andRelatedSysRoleCodeIn(List<String> values) {
            if (values.size() == 1) {
                return andRelatedSysRoleCodeEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " in",
                    values, "relatedSysRoleCode");

                return this;
            }
        }

        public Criteria andRelatedSysRoleCodeNotIn(List<String> values) {
            if (values.size() == 1) {
                return andRelatedSysRoleCodeNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " not in",
                    values, "relatedSysRoleCode");

                return this;
            }
        }

        public Criteria andRelatedSysRoleCodeIn(String[] values) {
            if (values.length == 1) {
                return andRelatedSysRoleCodeEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " in",
                    Arrays.asList(values), "relatedSysRoleCode");

                return this;
            }
        }

        public Criteria andRelatedSysRoleCodeNotIn(String[] values) {
            if (values.length == 1) {
                return andRelatedSysRoleCodeNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " not in",
                    Arrays.asList(values), "relatedSysRoleCode");

                return this;
            }
        }

        public Criteria andRelatedSysRoleCodeIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleCodeNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andRelatedSysRoleCodeBetween(String value1,
            String value2) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " between",
                value1, value2, "relatedSysRoleCode");

            return this;
        }

        public Criteria andRelatedSysRoleCodeNotBetween(String value1,
            String value2) {
            addCriterion(ISysRoleRelateDAO.RelatedSysRoleCode + " not between",
                value1, value2, "relatedSysRoleCode");

            return this;
        }

        public Criteria andSysRoleNameIsNull() {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " is null");

            return this;
        }

        public Criteria andSysRoleNameIsNotNull() {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " is not null");

            return this;
        }

        public Criteria andSysRoleNameIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " is not null AND " +
                ISysRoleRelateDAO.SysRoleName + " <> ''");

            return this;
        }

        public Criteria andSysRoleNameIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.SysRoleName + " is null OR " +
                ISysRoleRelateDAO.SysRoleName + " = '')");

            return this;
        }

        public Criteria andSysRoleNameEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " = ", value,
                "sysRoleName");

            return this;
        }

        public Criteria andSysRoleNameEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleName);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleNameEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleNameNotEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " <>", value,
                "sysRoleName");

            return this;
        }

        public Criteria andSysRoleNameNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " is null OR " +
                ISysRoleRelateDAO.SysRoleName + " <>", value, "sysRoleName");

            return this;
        }

        public Criteria andSysRoleNameNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleName);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleNameNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleNameGreaterThan(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " >", value,
                "sysRoleName");

            return this;
        }

        public Criteria andSysRoleNameGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleName);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleNameGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleNameGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " >=", value,
                "sysRoleName");

            return this;
        }

        public Criteria andSysRoleNameGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleName);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleNameGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleNameLessThan(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " <", value,
                "sysRoleName");

            return this;
        }

        public Criteria andSysRoleNameLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleName);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleNameLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleNameLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " <=", value,
                "sysRoleName");

            return this;
        }

        public Criteria andSysRoleNameLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleName);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleNameLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleNameLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.SysRoleName + " like",
                buffer.toString(), "sysRoleName");

            return this;
        }

        public Criteria andSysRoleNameNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.SysRoleName + " not like",
                buffer.toString(), "sysRoleName");

            return this;
        }

        public Criteria andSysRoleNameIn(List<String> values) {
            if (values.size() == 1) {
                return andSysRoleNameEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleName + " in", values,
                    "sysRoleName");

                return this;
            }
        }

        public Criteria andSysRoleNameNotIn(List<String> values) {
            if (values.size() == 1) {
                return andSysRoleNameNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleName + " not in", values,
                    "sysRoleName");

                return this;
            }
        }

        public Criteria andSysRoleNameIn(String[] values) {
            if (values.length == 1) {
                return andSysRoleNameEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleName + " in",
                    Arrays.asList(values), "sysRoleName");

                return this;
            }
        }

        public Criteria andSysRoleNameNotIn(String[] values) {
            if (values.length == 1) {
                return andSysRoleNameNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleName + " not in",
                    Arrays.asList(values), "sysRoleName");

                return this;
            }
        }

        public Criteria andSysRoleNameIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleNameNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleNameBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " between", value1,
                value2, "sysRoleName");

            return this;
        }

        public Criteria andSysRoleNameNotBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleName + " not between",
                value1, value2, "sysRoleName");

            return this;
        }

        public Criteria andSysRoleCodeIsNull() {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " is null");

            return this;
        }

        public Criteria andSysRoleCodeIsNotNull() {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " is not null");

            return this;
        }

        public Criteria andSysRoleCodeIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " is not null AND " +
                ISysRoleRelateDAO.SysRoleCode + " <> ''");

            return this;
        }

        public Criteria andSysRoleCodeIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.SysRoleCode + " is null OR " +
                ISysRoleRelateDAO.SysRoleCode + " = '')");

            return this;
        }

        public Criteria andSysRoleCodeEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " = ", value,
                "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleCodeEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleCode);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleCodeEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleCodeNotEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " <>", value,
                "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleCodeNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " is null OR " +
                ISysRoleRelateDAO.SysRoleCode + " <>", value, "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleCodeNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleCode);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleCodeNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleCodeGreaterThan(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " >", value,
                "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleCodeGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleCode);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleCodeGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleCodeGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " >=", value,
                "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleCodeGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleCode);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleCodeGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleCodeLessThan(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " <", value,
                "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleCodeLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleCode);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleCodeLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleCodeLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " <=", value,
                "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleCodeLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleCode);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleCodeLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleCodeLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " like",
                buffer.toString(), "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleCodeNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " not like",
                buffer.toString(), "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleCodeIn(List<String> values) {
            if (values.size() == 1) {
                return andSysRoleCodeEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleCode + " in", values,
                    "sysRoleCode");

                return this;
            }
        }

        public Criteria andSysRoleCodeNotIn(List<String> values) {
            if (values.size() == 1) {
                return andSysRoleCodeNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleCode + " not in", values,
                    "sysRoleCode");

                return this;
            }
        }

        public Criteria andSysRoleCodeIn(String[] values) {
            if (values.length == 1) {
                return andSysRoleCodeEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleCode + " in",
                    Arrays.asList(values), "sysRoleCode");

                return this;
            }
        }

        public Criteria andSysRoleCodeNotIn(String[] values) {
            if (values.length == 1) {
                return andSysRoleCodeNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleCode + " not in",
                    Arrays.asList(values), "sysRoleCode");

                return this;
            }
        }

        public Criteria andSysRoleCodeIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleCodeNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleCodeBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " between", value1,
                value2, "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleCodeNotBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleCode + " not between",
                value1, value2, "sysRoleCode");

            return this;
        }

        public Criteria andSysRoleTypeIsNull() {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " is null");

            return this;
        }

        public Criteria andSysRoleTypeIsNotNull() {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " is not null");

            return this;
        }

        public Criteria andSysRoleTypeIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " is not null AND " +
                ISysRoleRelateDAO.SysRoleType + " <> ''");

            return this;
        }

        public Criteria andSysRoleTypeIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.SysRoleType + " is null OR " +
                ISysRoleRelateDAO.SysRoleType + " = '')");

            return this;
        }

        public Criteria andSysRoleTypeEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " = ", value,
                "sysRoleType");

            return this;
        }

        public Criteria andSysRoleTypeEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleType);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleTypeEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleTypeNotEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " <>", value,
                "sysRoleType");

            return this;
        }

        public Criteria andSysRoleTypeNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " is null OR " +
                ISysRoleRelateDAO.SysRoleType + " <>", value, "sysRoleType");

            return this;
        }

        public Criteria andSysRoleTypeNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleType);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleTypeNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleTypeGreaterThan(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " >", value,
                "sysRoleType");

            return this;
        }

        public Criteria andSysRoleTypeGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleType);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleTypeGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleTypeGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " >=", value,
                "sysRoleType");

            return this;
        }

        public Criteria andSysRoleTypeGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleType);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleTypeGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleTypeLessThan(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " <", value,
                "sysRoleType");

            return this;
        }

        public Criteria andSysRoleTypeLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleType);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleTypeLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleTypeLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " <=", value,
                "sysRoleType");

            return this;
        }

        public Criteria andSysRoleTypeLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleType);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleTypeLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleTypeLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.SysRoleType + " like",
                buffer.toString(), "sysRoleType");

            return this;
        }

        public Criteria andSysRoleTypeNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.SysRoleType + " not like",
                buffer.toString(), "sysRoleType");

            return this;
        }

        public Criteria andSysRoleTypeIn(List<String> values) {
            if (values.size() == 1) {
                return andSysRoleTypeEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleType + " in", values,
                    "sysRoleType");

                return this;
            }
        }

        public Criteria andSysRoleTypeNotIn(List<String> values) {
            if (values.size() == 1) {
                return andSysRoleTypeNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleType + " not in", values,
                    "sysRoleType");

                return this;
            }
        }

        public Criteria andSysRoleTypeIn(String[] values) {
            if (values.length == 1) {
                return andSysRoleTypeEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleType + " in",
                    Arrays.asList(values), "sysRoleType");

                return this;
            }
        }

        public Criteria andSysRoleTypeNotIn(String[] values) {
            if (values.length == 1) {
                return andSysRoleTypeNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleType + " not in",
                    Arrays.asList(values), "sysRoleType");

                return this;
            }
        }

        public Criteria andSysRoleTypeIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysRoleTypeNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleTypeBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " between", value1,
                value2, "sysRoleType");

            return this;
        }

        public Criteria andSysRoleTypeNotBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleType + " not between",
                value1, value2, "sysRoleType");

            return this;
        }

        public Criteria andSysRoleDomainIdIsNull() {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " is null");

            return this;
        }

        public Criteria andSysRoleDomainIdIsNotNull() {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " is not null");

            return this;
        }

        public Criteria andSysRoleDomainIdIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId +
                " is not null AND " + ISysRoleRelateDAO.SysRoleDomainId +
                " <> ''");

            return this;
        }

        public Criteria andSysRoleDomainIdIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.SysRoleDomainId +
                " is null OR " + ISysRoleRelateDAO.SysRoleDomainId + " = '')");

            return this;
        }

        public Criteria andSysRoleDomainIdEqualTo(long value) {
            return andSysRoleDomainIdEqualTo(Long.valueOf(value));
        }

        public Criteria andSysRoleDomainIdEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " = ", value,
                "sysRoleDomainId");

            return this;
        }

        public Criteria andSysRoleDomainIdEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleDomainId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleDomainIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleDomainIdNotEqualTo(long value) {
            return andSysRoleDomainIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andSysRoleDomainIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " <>", value,
                "sysRoleDomainId");

            return this;
        }

        public Criteria andSysRoleDomainIdNotEqualToOrIsNull(long value) {
            return andSysRoleDomainIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andSysRoleDomainIdNotEqualToOrIsNull(
            java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " is null OR " +
                ISysRoleRelateDAO.SysRoleDomainId + " <>", value,
                "sysRoleDomainId");

            return this;
        }

        public Criteria andSysRoleDomainIdNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleDomainId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleDomainIdNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleDomainIdGreaterThan(long value) {
            return andSysRoleDomainIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andSysRoleDomainIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " >", value,
                "sysRoleDomainId");

            return this;
        }

        public Criteria andSysRoleDomainIdGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleDomainId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleDomainIdGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleDomainIdGreaterThanOrEqualTo(long value) {
            return andSysRoleDomainIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andSysRoleDomainIdGreaterThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " >=", value,
                "sysRoleDomainId");

            return this;
        }

        public Criteria andSysRoleDomainIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleDomainId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleDomainIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleDomainIdLessThan(long value) {
            return andSysRoleDomainIdLessThan(Long.valueOf(value));
        }

        public Criteria andSysRoleDomainIdLessThan(java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " <", value,
                "sysRoleDomainId");

            return this;
        }

        public Criteria andSysRoleDomainIdLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleDomainId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleDomainIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleDomainIdLessThanOrEqualTo(long value) {
            return andSysRoleDomainIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andSysRoleDomainIdLessThanOrEqualTo(
            java.lang.Long value) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " <=", value,
                "sysRoleDomainId");

            return this;
        }

        public Criteria andSysRoleDomainIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysRoleDomainId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysRoleDomainIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleDomainIdIn(long[] values) {
            if (values.length == 1) {
                return andSysRoleDomainIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " in", values,
                    "sysRoleDomainId");

                return this;
            }
        }

        public Criteria andSysRoleDomainIdNotIn(long[] values) {
            if (values.length == 1) {
                return andSysRoleDomainIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " not in",
                    values, "sysRoleDomainId");

                return this;
            }
        }

        public Criteria andSysRoleDomainIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andSysRoleDomainIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " in", values,
                    "sysRoleDomainId");

                return this;
            }
        }

        public Criteria andSysRoleDomainIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andSysRoleDomainIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " not in",
                    values, "sysRoleDomainId");

                return this;
            }
        }

        public Criteria andSysRoleDomainIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andSysRoleDomainIdEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " in",
                    Arrays.asList(values), "sysRoleDomainId");

                return this;
            }
        }

        public Criteria andSysRoleDomainIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andSysRoleDomainIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " not in",
                    Arrays.asList(values), "sysRoleDomainId");

                return this;
            }
        }

        public Criteria andSysRoleDomainIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleDomainIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysRoleDomainIdBetween(long value1, long value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " between",
                value1, value2, "sysRoleDomainId");

            return this;
        }

        public Criteria andSysRoleDomainIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " between",
                value1, value2, "sysRoleDomainId");

            return this;
        }

        public Criteria andSysRoleDomainIdNotBetween(long value1, long value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " not between",
                value1, value2, "sysRoleDomainId");

            return this;
        }

        public Criteria andSysRoleDomainIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysRoleRelateDAO.SysRoleDomainId + " not between",
                value1, value2, "sysRoleDomainId");

            return this;
        }

        public Criteria andSysDomainCodeIsNull() {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " is null");

            return this;
        }

        public Criteria andSysDomainCodeIsNotNull() {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " is not null");

            return this;
        }

        public Criteria andSysDomainCodeIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " is not null AND " +
                ISysRoleRelateDAO.SysDomainCode + " <> ''");

            return this;
        }

        public Criteria andSysDomainCodeIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.SysDomainCode +
                " is null OR " + ISysRoleRelateDAO.SysDomainCode + " = '')");

            return this;
        }

        public Criteria andSysDomainCodeEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " = ", value,
                "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainCodeEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainCode);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainCodeEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysDomainCodeNotEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " <>", value,
                "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainCodeNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " is null OR " +
                ISysRoleRelateDAO.SysDomainCode + " <>", value, "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainCodeNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainCode);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainCodeNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDomainCodeGreaterThan(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " >", value,
                "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainCodeGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainCode);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainCodeGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysDomainCodeGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " >=", value,
                "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainCodeGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainCode);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainCodeGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDomainCodeLessThan(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " <", value,
                "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainCodeLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainCode);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainCodeLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysDomainCodeLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " <=", value,
                "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainCodeLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainCode);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainCodeLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDomainCodeLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " like",
                buffer.toString(), "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainCodeNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " not like",
                buffer.toString(), "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainCodeIn(List<String> values) {
            if (values.size() == 1) {
                return andSysDomainCodeEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysDomainCode + " in", values,
                    "sysDomainCode");

                return this;
            }
        }

        public Criteria andSysDomainCodeNotIn(List<String> values) {
            if (values.size() == 1) {
                return andSysDomainCodeNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysDomainCode + " not in",
                    values, "sysDomainCode");

                return this;
            }
        }

        public Criteria andSysDomainCodeIn(String[] values) {
            if (values.length == 1) {
                return andSysDomainCodeEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysDomainCode + " in",
                    Arrays.asList(values), "sysDomainCode");

                return this;
            }
        }

        public Criteria andSysDomainCodeNotIn(String[] values) {
            if (values.length == 1) {
                return andSysDomainCodeNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysDomainCode + " not in",
                    Arrays.asList(values), "sysDomainCode");

                return this;
            }
        }

        public Criteria andSysDomainCodeIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDomainCodeNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDomainCodeBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " between", value1,
                value2, "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainCodeNotBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.SysDomainCode + " not between",
                value1, value2, "sysDomainCode");

            return this;
        }

        public Criteria andSysDomainNameIsNull() {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " is null");

            return this;
        }

        public Criteria andSysDomainNameIsNotNull() {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " is not null");

            return this;
        }

        public Criteria andSysDomainNameIsNotEmpty() {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " is not null AND " +
                ISysRoleRelateDAO.SysDomainName + " <> ''");

            return this;
        }

        public Criteria andSysDomainNameIsEmpty() {
            addCriterion("(" + ISysRoleRelateDAO.SysDomainName +
                " is null OR " + ISysRoleRelateDAO.SysDomainName + " = '')");

            return this;
        }

        public Criteria andSysDomainNameEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " = ", value,
                "sysDomainName");

            return this;
        }

        public Criteria andSysDomainNameEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainName);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainNameEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysDomainNameNotEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " <>", value,
                "sysDomainName");

            return this;
        }

        public Criteria andSysDomainNameNotEqualToOrIsNull(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " is null OR " +
                ISysRoleRelateDAO.SysDomainName + " <>", value, "sysDomainName");

            return this;
        }

        public Criteria andSysDomainNameNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainName);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainNameNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDomainNameGreaterThan(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " >", value,
                "sysDomainName");

            return this;
        }

        public Criteria andSysDomainNameGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainName);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainNameGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysDomainNameGreaterThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " >=", value,
                "sysDomainName");

            return this;
        }

        public Criteria andSysDomainNameGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainName);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainNameGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDomainNameLessThan(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " <", value,
                "sysDomainName");

            return this;
        }

        public Criteria andSysDomainNameLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainName);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainNameLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andSysDomainNameLessThanOrEqualTo(String value) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " <=", value,
                "sysDomainName");

            return this;
        }

        public Criteria andSysDomainNameLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysRoleRelateDAO.SysDomainName);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSysDomainNameLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDomainNameLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.SysDomainName + " like",
                buffer.toString(), "sysDomainName");

            return this;
        }

        public Criteria andSysDomainNameNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysRoleRelateDAO.SysDomainName + " not like",
                buffer.toString(), "sysDomainName");

            return this;
        }

        public Criteria andSysDomainNameIn(List<String> values) {
            if (values.size() == 1) {
                return andSysDomainNameEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysDomainName + " in", values,
                    "sysDomainName");

                return this;
            }
        }

        public Criteria andSysDomainNameNotIn(List<String> values) {
            if (values.size() == 1) {
                return andSysDomainNameNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysRoleRelateDAO.SysDomainName + " not in",
                    values, "sysDomainName");

                return this;
            }
        }

        public Criteria andSysDomainNameIn(String[] values) {
            if (values.length == 1) {
                return andSysDomainNameEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysDomainName + " in",
                    Arrays.asList(values), "sysDomainName");

                return this;
            }
        }

        public Criteria andSysDomainNameNotIn(String[] values) {
            if (values.length == 1) {
                return andSysDomainNameNotEqualTo(values[0]);
            } else {
                addCriterion(ISysRoleRelateDAO.SysDomainName + " not in",
                    Arrays.asList(values), "sysDomainName");

                return this;
            }
        }

        public Criteria andSysDomainNameIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDomainNameNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSysDomainNameBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " between", value1,
                value2, "sysDomainName");

            return this;
        }

        public Criteria andSysDomainNameNotBetween(String value1, String value2) {
            addCriterion(ISysRoleRelateDAO.SysDomainName + " not between",
                value1, value2, "sysDomainName");

            return this;
        }
    }
}
